/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SPATIAL_LOCATION_INFO_H
#define SPATIAL_LOCATION_INFO_H
#include <string>
#include <unistd.h>

#include "nocopyable.h"
#include "parcel.h"

namespace OHOS {
namespace Msdp {
enum class DirectionType : int32_t {
    TYPE_INVAILD_DIRECTION = -1,
    TYPE_FRONT,
    TYPE_BACK,
    TYPE_LEFT,
    TYPE_RIGHT,
    TYPE_UP,
    TYPE_DOWN,
};

enum class InnerOuterType : int32_t {
    TYPE_INVAILD_INNEROUTER = -1,
    TYPE_INNER,
    TYPE_OUTER,
};

enum class ExistType : int32_t {
    TYPE_INVALID = -1,
    TYPE_EXIST,
    TYPE_NOT_EXIST,
};

/**
 * @struct DirectionResponse
 * Defines direction response
 */
struct DirectionResponse : public Parcelable {
    DirectionType directionType;
    bool ReadFromParcel(Parcel &parcel);
    virtual bool Marshalling(Parcel &parcel) const override;
    static DirectionResponse *Unmarshalling(Parcel &parcel);
};

/**
 * @struct DistanceResponse
 * Defines distance response
 */
struct DistanceResponse : public Parcelable {
    double distance;
    bool ReadFromParcel(Parcel &parcel);
    virtual bool Marshalling(Parcel &parcel) const override;
    static DistanceResponse *Unmarshalling(Parcel &parcel);
};

/**
 * @struct AngleResponse
 * Defines angle response
 */
struct AngleResponse : public Parcelable {
    double angle;
    bool ReadFromParcel(Parcel &parcel);
    virtual bool Marshalling(Parcel &parcel) const override;
    static AngleResponse *Unmarshalling(Parcel &parcel);
};

/**
 * @struct InnerOuterResponse
 * Defines InnerOuter response
 */
struct InnerOuterResponse : public Parcelable {
    InnerOuterType innerOuterType;
    bool ReadFromParcel(Parcel &parcel);
    virtual bool Marshalling(Parcel &parcel) const override;
    static InnerOuterResponse *Unmarshalling(Parcel &parcel);
};

/**
 * @struct ExistResponse
 * Defines exist response
 */
struct ExistResponse : public Parcelable {
    ExistType existType;
    bool ReadFromParcel(Parcel &parcel);
    virtual bool Marshalling(Parcel &parcel) const override;
    static ExistResponse *Unmarshalling(Parcel &parcel);
};
} // namespace Msdp
} // namespace OHOS

#endif // SPATIAL_LOCATION_INFO_H